package com.qgz.framework;

import com.google.inject.Guice;
import com.google.inject.Injector;


public class BeanFactory {
	
	private static Injector guiceInject;
	
	public static <T> T getInstance(Class<T> key){
		if (guiceInject == null){
			guiceInject = Guice.createInjector();		
		}
		return guiceInject.getInstance(key);
	}
}
